import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ahj_app/base/basewidget/HttpUtils/HttpBaseConst.dart';
import 'package:flutter_ahj_app/base/cunchu/Constant.dart';
import 'package:flutter_ahj_app/base/cunchu/UserInfoUtils.dart';
import 'package:flutter_ahj_app/base/pluglin/ZhiBoUtils.dart';
import 'package:flutter_ahj_app/base/rouleutils/RouleUtils.dart';
import 'package:flutter_ahj_app/base/utils/StringUtils.dart';

import '../pluglin/wxplulin/WxJumpUtils.dart';

class JPushUtils {
  // 点击跳转公告详情
  static clickNotify(BuildContext context, var extra) {
    String type = extra["type"];
    String jsonData = extra["jsonData"];

    if (type == "project") {} else if (type == "newCustomForservicePerson") {
      Navigator.pushNamed(context, '/KhbfHomeView', arguments: 1);
    } else if (type == "newVisitTaskNoticeForservicePerson" ||
        type == "visitTasksTodo") {
      Navigator.pushNamed(context, '/KhbfHomeView');
    } else if (type == "supplierInvitationUser") {
      Navigator.pushNamed(context, RouleUtils.myxuqiufMessageView,
          arguments: {"index": 1});
    } else if (type == "company") {
      Navigator.pushNamed(context, "/QYRenZhengView");
    } else if (type == "engineer" || type == "engineerCertificationTodo") {
      Navigator.pushNamed(context, "/PersonalCertView");
    } else if (type == "troubleshootingTodo") {
      //隐患排查、进行中列表
      Navigator.pushNamed(context, "/YHPCProductView", arguments: 1);
    } else if (type == "azxHiddenCheckTaskComplete") {
      //隐患排查、完成中列表
      Navigator.pushNamed(context, "/YHPCProductView", arguments: 2);
    } else if (type == "remindDate") {
      Navigator.pushNamed(context, "/beiwanglu/home");
    }
  }
}
